package com.gzpi.hwgggh.controller;

import com.gzpi.hwgggh.service.StreetService;
import com.gzpi.hwgggh.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date : 2021-02-08 10:51
 **/
@RequestMapping("/street")
@RestController
@CrossOrigin
public class StreetController {

    @Autowired
    private StreetService streetService;

    @RequestMapping("/getAllXzq.do")
    public Result getAllXzq(){
        return streetService.selectdAllXzq();
    }

    @RequestMapping("/getAllSsjd.do")
    public Result getAllSsjdByXzq(String xzq){
        return streetService.selectAllJDByXzq(xzq);
    }

    @RequestMapping("/getAllDwbh.do")
    public Result getAllDwbhByXzqAndSzjd(String xzq,String szjd){
        return streetService.selectAllDwbhByXzqAndSzjd(xzq,szjd);
    }

}
